home *** CD-ROM | disk | FTP | other *** search
- on TitleCase mytext
- repeat with index = 1 to the number of words in mytext
- set myword to word index of mytext
- set mychar to char 1 of myword
- set mycharval to charToNum(mychar)
- if (mycharval > 96) and (mycharval < (96 + 27)) then
- set mychar to numToChar(mycharval - 32)
- put mychar into char 1 of myword
- put myword into word index of mytext
- end if
- end repeat
- return mytext
- end
-
- on UnTitleCase mytext
- repeat with index = 1 to the number of words in mytext
- set myword to word index of mytext
- set mychar to char 1 of myword
- set mycharval to charToNum(mychar)
- if (mycharval > 64) and (mycharval < (64 + 27)) then
- set mychar to numToChar(mycharval + 32)
- put mychar into char 1 of myword
- put myword into word index of mytext
- end if
- end repeat
- return mytext
- end
-
- on UpperCase mytext
- repeat with index = 1 to the number of chars in mytext
- set mychar to char index of mytext
- set mycharval to charToNum(mychar)
- if (mycharval > 96) and (mycharval < (96 + 27)) then
- set mychar to numToChar(mycharval - 32)
- put mychar into char index of mytext
- end if
- end repeat
- return mytext
- end
-
- on LowerCase mytext
- repeat with index = 1 to the number of chars in mytext
- set mychar to char index of mytext
- set mycharval to charToNum(mychar)
- if (mycharval > 64) and (mycharval < (64 + 27)) then
- set mychar to numToChar(mycharval + 32)
- put mychar into char index of mytext
- end if
- end repeat
- return mytext
- end
-